/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package service;

import java.util.List;

public interface IService<T> {

    public T find(Class<T> clazz, int id);

    public void create(T baseBean);

    public void delete(T baseBean);

    public void save(T baseBean);

    public List<T> list(String hql);

    public int getTotalCount(String hql, Object... params);

    public List<T> list(String hql, int firstResult, int maxSize,
            Object... params);

    /**
     * @author: Yu
     * @return
     * I defined this method to get the total number of the threads
     */
    //public int countAll(String hql);
}
